﻿namespace vKapse.VirtualDesktop
{

	#region Using

	using System;
	using System.Collections.Generic;
	using System.ComponentModel;
	using System.Data;
	using System.Drawing;
	using System.Text;
	using System.Windows.Forms;
	using vKapse.VirtualDesktop.Core;

	#endregion Using

	/// <summary>
	/// Fake form
	/// </summary>
	public partial class MainForm : Form
	{

		#region Members
		
		private DesktopManager m_manager;

		#endregion Members

		#region Constructor

		/// <summary>
		/// Constructor
		/// </summary>
		public MainForm()
		{
			this.InitializeComponent();
			this.Load += new EventHandler(MainForm_Load);
		}

		#endregion Constructor

		#region Event Reactions

		void MainForm_Load(object sender, EventArgs e)
		{
			this.Load -= new EventHandler(MainForm_Load);

			this.m_manager = new DesktopManager();
			this.m_manager.Init();
			if (this.m_manager.Desktops.Length > 0)
			{
				Desktop desktop = this.m_manager.Desktops[0];
				this.m_manager.Show(desktop);
				return;
			}
			MessageBox.Show("No desktops found.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
		}

		#endregion Event Reactions


	}
}
